home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 26.zip
/
BS1 part 26
/
C for beginners.adf
/
source
/
backwards.c
< prev
next >
Wrap
C/C++ Source or Header
|
1978-01-17
|
452b
|
25 lines
/* backwards.c 6.1 */
void main()
{
char input[81];
int index;
printf("Please input some text!\n");
scanf("%s", input); /* Strings do not require & */
for(index = 0; input[index] !=0; index = index + 1)
; /* Search for End mark! */
printf("Your input >%s< has %d characters\n", input, index);
do
{
index = index - 1;
printf("%c", input[index]);
} while(index > 0);
printf("\n\n"); /*Blank line before Prompt */
}